package com.liohi.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.liohi.Param.R;
import com.liohi.entity.Menu;
import com.liohi.entity.SimulationEquipment;
import com.liohi.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.liohi.entity.vo.UserLoginVo;
import com.liohi.entity.vo.UserRegisterVo;

import java.util.List;

/**
* @author liohi
* @description 针对表【user】的数据库操作Service
* @createDate 2023-08-02 15:10:31
*/
public interface UserService extends IService<User> {
    R login(UserLoginVo user);

    List<Menu> getMenusByToken(String token);

    List<String> getPathsByToken(String token);

    String getNameByToken(String token);

    User getUserByUsername(String username);

    R insertUser(UserRegisterVo user);

    /**
     * 更新用户（同时更新User_role）
     * @param user
     * @return
     */
    public R updateUser(User user);

    String getAvatarByUserId(Integer userId);

    List<User> getUserList();

    IPage<User> listByPage(Integer pageNum, Integer pageSize, String username, String name);

}
